#include "Server.hpp"
#include "Comm.hpp"

int main ()
{
    Server server;
    std::cout << "pos 1" << std::endl;
    server.OpenPipe();
    std::cout << "pos 2" << std::endl;

    std::string message;
    while (true)
    {
        if(server.RecvPipe(&message) > 0)
        {
            std::cout << "client Say# "<< message << std::endl;
        }
        else
        {
            break;
        }
    }
    
    std::cout << "client quit" <<std::endl;
    server.ClosePipe();
    return 0;
}